package com.yy.QSManage.api;

import com.yy.QSManage.common.Result;
import com.yy.QSManage.model.entity.FaSysSettings;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/FaSysSettingsApi")
@Api(tags = "系统设置")
public class FaSysSettingsApi extends BaseApi<FaSysSettings>{

    @ApiOperation("获取系统设置")
    @ApiImplicitParam(name = "keyName", value = "keyName", required = true, dataType = "String", paramType = "path")
    @GetMapping("/getByKeyName/{keyName}")
    public Result<FaSysSettings> getByKeyName(@PathVariable String keyName){
        return Result.success(baseService.getByParam(FaSysSettings::getKeyName, keyName));
    }
}
